<template>
  <div class="left-chart-2">
    <div class="lc2-header">设备在线情况</div>
    <div class="lc2-details">设备运行总数<span>245</span></div>
    <dv-active-ring-chart :config="config" class="lc2-chart" />

    <dv-decoration-2 style="height: 10px" />
  </div>
</template>

<script>
export default {
  name: "LeftChart2",
  data() {
    return {
      config: {
        data: [
          {
            name: "路口1",
            value: 55,
          },
          {
            name: "路口2",
            value: 120,
          },
          {
            name: "路口3",
            value: 78,
          },
        ],
        color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
      },
      radius: 100,
    };
  },
  methods: {
    increment() {
      this.data[1].value = this.data[1].value + 200;
    },
  },
};
</script>

<style lang="less">
.left-chart-2 {
  width: 100%;
  height: 30%;
  display: flex;
  flex-direction: column;

  .lc2-header {
    height: 20px;
    line-height: 20px;
    font-size: 20px;
    text-indent: 20px;
    margin-top: 10px;
    font-weight: 700;
  }

  .lc2-details {
    height: 40px;
    font-size: 16px;
    display: flex;
    align-items: center;
    text-indent: 20px;

    span {
      color: #096dd9;
      font-weight: bold;
      font-size: 35px;
      margin-left: 20px;
    }
  }

  .lc2-chart {
    height: calc(~"100% - 80px");
  }
}
</style>
